#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
'''
@author: yuejl
@application:
@contact: lewyuejian@163.com
@file: member_api.py
@time: 2021/3/21 0021 18:34
@desc: 封装成员管理api对象
'''
import json

from wechatapi.client import HttpRequest

class Member(HttpRequest):
    def add_member(self, api_content):


        return self.visit_request_api(api_content)
    def create_member(self, api_content):
        """
        创建成员
        :param api_content:
        :return:
        """
        if api_content['json']['department'] is None:
            api_content['json']['department'] = "1"

        resp = self.visit_request_api_v3(api_content)
        return resp

    def get_member(self, api_content):
        """
        获取成员信息
        :param api_content:
        :return:
        """
        return self.visit_request_api(api_content)

    def update_member(self, api_content):
        """
        修改/更新成员信息
        :param api_content:
        :return:
        """
        return self.visit_request_api(api_content)

    def delete_member(self, api_content):
        """
        删除成员
        :param api_content:
        :return:
        """
        return self.visit_request_api(api_content)

    def batch_delete_member(self, api_content):
        """
        批量删除成员
        :param api_content:
        :return:
        """
        return self.visit_request_api(api_content)